home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / 8bit / cislib_a / gr9pwd.act < prev    next >
Text File  |  1995-04-22  |  2KB  |  81 lines

  1. ; *** Graphics 9 Picture Printer
  2. ; *** for Prowriter printers.
  3. ;    
  4. ; Files MUST be uncompressed (most are)
  5. ;  resulting in 7680 bytes or 62 SD sectors long.
  6. ;
  7. ; written by Joe McFarland   8/31/86.
  8. ; address questions to CIS #74666,601
  9. ;
  10. ; Action! language is (c) 1983 Action Computer Services
  11. ;
  12. MODULE
  13. BYTE x,y,dat,half,v,ty
  14. CARD screen=88
  15. BYTE POINTER sloc
  16. CHAR ARRAY printfile(15)
  17.  
  18. PROC GetScreen()
  19. PutE()
  20. PrintE("Graphic 9 Screen to print")
  21. PrintE(">Dn:FILENAME.EXT")
  22. Print(">")
  23. InputS(printfile)
  24. Close(1)
  25. Open(1,printfile,4,0)
  26. Graphics(9)
  27. FOR sloc=screen TO screen+7679
  28. DO
  29.   sloc^=GetD(1)
  30. OD
  31. Close(1)
  32. RETURN
  33.  
  34.  
  35. PROC Dump()
  36. ;These are the color masks, 4 per Gr.9 color.
  37. BYTE ARRAY template=[255 255 255 255  255 255 247 255  255 223 255 251  255 238 255 187
  38.                      255 85 255 170  221 119 221 119  170 85 170 85  204 51 204 51         
  39.                      102 51 102 51  34 136 34 136  0 85 0 85  0 51 0 51
  40.                      0 17 0 68  0 32 0 4  0 0 8 0  0 0 0 0]
  41.  
  42. GetScreen()
  43. Close(2)
  44. Open(2,"P:",8)
  45. PrintDE(2,"
  46. T16
  47. Q
  48. >")
  49. FOR x=0 TO 79
  50. DO
  51.   PrintD(2,"                  ")
  52.   PrintD(2,"
  53. S0768")  
  54.   FOR ty=0 TO 191 
  55.   DO  
  56.     y=191-ty
  57.     sloc=screen+40*y+x/2
  58.     half=x MOD 2    ;which half?
  59.     v=sloc^
  60.     IF half THEN v=v&$0F                    
  61.        ELSE v=v RSH 4 FI ;shift color if odd 
  62.     FOR dat=0 TO 3
  63.     DO  
  64.       PutD(2,template(v*4+dat))
  65.     OD
  66.   OD    ;done printing line
  67.   PutDE(2)
  68. OD
  69. PrintDE(2,"
  70. [
  71. A
  72. N
  73. <") ;restore normal operation
  74. Close(2)
  75. Graphics(0)
  76. PutE()
  77. PrintF(" * Done printing %S%E",printfile)
  78. RETURN
  79.  
  80.  
  81.